package spark;

/**
 * Created by Administrator on 2017/7/6.
 */
public class TaskRegion {
    private boolean type;
    private long taskId;
    private String host;
    private String tableName;
    private String startKey;
    private String endKey;

    public TaskRegion(long taskId) {
        this.taskId = taskId;
        this.type = true;
    }

    public TaskRegion(long taskId, String host, String tableName, String startKey, String endKey) {
        this.taskId = taskId;
        this.host = host;
        this.tableName = tableName;
        this.startKey = startKey;
        this.endKey = endKey;
        this.type = false;
    }

    public long getTaskId() {
        return taskId;
    }

    public void setTaskId(long taskId) {
        this.taskId = taskId;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getStartKey() {
        return startKey;
    }

    public void setStartKey(String startKey) {
        this.startKey = startKey;
    }

    public String getEndKey() {
        return endKey;
    }

    public void setEndKey(String endKey) {
        this.endKey = endKey;
    }

    public boolean isType() {
        return type;
    }

    public void setType(boolean type) {
        this.type = type;
    }

@Override
public String toString() {
    return "TaskRegion{" +
            "type=" + type +
            ", taskId=" + taskId +
            ", host='" + host + '\'' +
            ", tableName='" + tableName + '\'' +
            ", startKey='" + startKey + '\'' +
            ", endKey='" + endKey + '\'' +
            '}';
}
}
